package com.albaba.designpattern.decorator.text_002;

/**
 * @author zx
 * @version 1.0
 * @description 抽象装饰者类
 * @date 2025/2/20 20:54
 */
public class DataLoaderDecorator implements DataLoader {

    private DataLoader dataLoader;

    public DataLoaderDecorator(DataLoader dataLoader) {
        this.dataLoader = dataLoader;
    }

    @Override
    public String read() {
        return dataLoader.read();
    }

    @Override
    public void write(String data) {
        dataLoader.write(data);
    }
}
